package com.cskaoyan.javase.basic._4scanner;

import java.util.Scanner;

/**
 * 键盘录入两个double数值,然后输出最大值
 * @since 17:38
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class Demo5 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入两个double数值:");
        double d1 = sc.nextDouble();
        double d2 = sc.nextDouble();
        double max = (d1 > d2) ? d1 : d2;
        System.out.println("这两个数的最大值是:" + max);
    }
}
